package com.rivulet.dawn.api.response;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * @author: xjc
 * @date: 2022/8/15 13:31
 **/
@Data
@ApiModel(value = "勇者搜索返回列表")
public class BraveSearchResponse {
    @ApiModelProperty(value = "主键")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱")
    private String email;

    /**
     * 姓名
     */
    @ApiModelProperty(value = "姓名")
    private String name;

    /**
     * 所处时代
     */
    @ApiModelProperty(value = "所处时代")
    private String era;

    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    private String pic;

    /**
     * 灵魂代码
     */
    @ApiModelProperty(value = "灵魂代码")
    private String soulCode;

    /**
     * 世界创造值
     */
    @ApiModelProperty(value = "世界创造值")
    private Integer worldCreate;

    /**
     * 身份代码
     */
    @ApiModelProperty(value = "身份代码")
    private Long identity;

    /**
     * 身份描述
     */
    @ApiModelProperty(value = "身份描述")
    private String identityDesc;

    /**
     * 能力代码
     */
    @ApiModelProperty(value = "能力代码")
    private Long power;

    /**
     * 能力描述
     */
    @ApiModelProperty(value = "能力描述")
    private String powerDesc;

    /**
     * 手机号码
     */
    @ApiModelProperty(value = "手机号码")
    private String phone;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)
    private LocalDateTime updateTime;
}
